<template>
    <div>
        <el-radio-group class="group1" v-model="radio" @change="handleWave">
            <el-radio :label="item" v-for="item in list">{{ item.label }}</el-radio>
        </el-radio-group>
    </div>
</template>

<script>
export default {
    data() {
        return {
            radio: null,
        }
    },
    props: {
        list: {
            type: Array,
            default: [],
        },
    },
    methods: {
        handleWave(e) {
            this.$emit('handleWave', e)
        },
        setDefault(e) {
            this.$set(this, 'radio', e)
        },
    },
    mounted() {
        setTimeout(() => {
            this.$nextTick(() => {

                this.$set(this, 'radio', this.list[0])
            })
        }, 100)
    },
}
</script>

<style lang="less" scoped>
.group1 {
    display: flex;
    flex-direction: column;
    padding: 4px 10px;

    .el-radio {
        margin-bottom: 4px;
    }
}
</style>
